#ifndef __COMPONENT_FURNITURE_INVENTORY_H__
#define __COMPONENT_FURNITURE_INVENTORY_H__

#include "Game/IInventory.hpp"
#include "Component.hpp"

namespace PocketSurvival
{
    struct ComponentFurnitureInventory : public Component, public IInventory
    {
        virtual uint32_t slotsCount() override;
        virtual void setSlotValue(uint32_t slotIndex, int32_t cellValue, uint32_t valueCount) override;
        virtual int32_t getSlotValue(uint32_t slotIndex) override;
        virtual uint32_t getSlotCount(uint32_t slotIndex) override;
        virtual void onSlotChange(uint32_t slotIndex) override;
        virtual uint32_t getSlotCapacity(uint32_t slotIndex, int32_t cellValue) override;
        virtual uint32_t getSlotProcessCapacity(uint32_t slotIndex, int32_t cellValue) override;
        virtual void addSlotItems(uint32_t slotIndex, int32_t cellValue, uint32_t count) override;
        virtual bool addNetSlotItems(uint32_t slotIndex, int32_t cellValue, uint32_t count) override;
        virtual void processSlotItems(IInventory *sourceInventory, uint32_t sourceSlotIndex, uint32_t slotIndex, int32_t cellValue, uint32_t count, uint32_t processCount, int32_t &outProcessedValue, uint32_t &outProcessedCount) override;
        virtual uint32_t removeSlotItems(uint32_t slotIndex, uint32_t count) override;
        virtual uint32_t removeNetSlotItems(uint32_t slotIndex, uint32_t count) override;
        virtual void dropAllItems(const Vector3 &position) override;
        virtual void dropSlotItems(uint32_t slotIndex, const Vector3 &position, const Vector3 &velocity) override;

        virtual const std::string &getName() const override;
        static const std::string &GetName();
        virtual void load(const nlohmann::json &jsonData) override;
        virtual void save(nlohmann::json &jsonData) override;
        virtual void saveToMsgJson(nlohmann::json &jsonData) override;
    };

} // namespace PocketSurvival

#endif